package intelligentcity.model.streets;

import intelligentcity.model.Move;
import intelligentcity.model.Point;

public class VerticalOneWayStreet extends OneWayStreet {

    public VerticalOneWayStreet(int x1, int y1, int y2, Move move) {
        super(x1, y1, x1, y2);
        this.move = move;
    }

    @Override
    public boolean contains(Point point) {

        if (p1.getX() == point.getX() && point.getY() >= p1.getY() && point.getY() <= p2.getY()) {
            return true;
        }
        return false;
    }
}
